		
			
				<?php if (count($this->paginator)):?> 
						<form action="<?= $this->url(array('action'=>'check-all')); ?>" method="post">
							<table>
								
								<thead>
									<tr>
									   	<?php if ($this->checAll):?>
									   		<th width="10"><input class="check-all" type="checkbox" /></th>
									   	<?php endif;?>
									   	<?php foreach ($this->columns as $k=>$info):?>
									   		<?php 
									   			$sortdir 	= 'asc';
									   			$sortclass 	= 'sort';
									   			if ($this->sort == $k) {
									   				if ($this->sortdir == 'asc')
									   					$sortdir = 'desc';
									   				$sortclass = 'sort '.$this->sortdir;									   				
									   			} 
									   		?>
									   	
									   		<th <?php foreach ($info['attr'] as $ak=>$av) { echo $ak.'="'.$av.'"'; } ?> >
									   			<a href="<?php echo $this->url(array('sort'=>$k, 'page'=>null, 'sortdir'=>$sortdir))?>" class="<?php echo $sortclass?>">
									   				<?php echo $info['label']?>
									   			</a>
									   		</th>
										<?php endforeach;?>
										<th width="<?php echo 55 * count($this->actions)?>">Akcje</th>
									</tr>
									
								</thead>
							 
								<tfoot>
									<tr>
										<td colspan="100">
										
											<?php if ($this->checAll):?>
											<div class="bulk-actions align-left">
												
													<select name="method">
														<option value="">Z zaznaczonymi...</option>
														<?php foreach ($this->checAllActions as $action=>$label):?>
															<option value="<?php echo $action; ?>"><?php echo $label?></option>
														<?php endforeach;?>
													</select>
													<input type="submit" class="button" value="Zastosuj" />
												
											</div>
											<?php endif;?>
										
											<?php echo $this->paginationControl($this->paginator,
											                                    'Sliding',
											                                    '_pagination.phtml'); ?>
											
											
											<div class="clear"></div>
										</td>
									</tr>
								</tfoot>
							 
								<tbody>
								
									<?php foreach ($this->paginator as $item):?>
									
									<tr>
										<?php if ($this->checAll):?>
											<td><input type="checkbox" name="id[]" value="<?php echo $item->id?>" /></td>
										<?php endif;?>
										
										<?php foreach ($this->columns as $key=>$info):?>
											<td <?php foreach ($info['tdattr'] as $ak=>$av) { echo $ak.'="'.$av.'"'; } ?> >
												
												<?php if ($info['type'] == 'standard'):?>
													
													<?php echo $item->{$key}?>
													
												<?php elseif($info['type']=='flag'):?>
											
													<a 
														href="<?php echo $this->url(array('action'=>'flag', 'id'=>$item->id, 'key'=>$key))?>" 
														class="checkbox <?php echo $item->{$key}?'checked':'unchecked'?>"
														></a>
											
												<?php endif;?>
												
											</td>
										<?php endforeach;?>
										
										<td>
											<?php foreach ($this->actions as $action):
												$params = $action['params'];
												foreach ($action['keys'] as $key) {
													$params[$key] = $item->{$key};
												}
											?>
												
												<a href="<?php echo $this->url($params)?>" class="icon <?php echo $action['class']?>">
													<?php echo $action['label']?>
												</a>
											<?php endforeach;?>
										</td>
									</tr>
									
									<?php endforeach;?>
									
								</tbody>
								
							</table>
						</form>
						<?php else:?>
							<div class="notification attention png_bg">
								<div>
									Brak rekordów spełniających podane kryteria.
								</div>
							</div>
						<?php endif;?>
				
			